import Login from './views/login/login.vue'
import Home from './views/home.vue'
import Index from './views/index/index.vue'
import InfoCenter from './views/commonPlatform/infoCenter.vue'
import UserCenter from './views/commonPlatform/userCenter.vue'
import LandlordManage from './views/landlord/landlordManage.vue'
import LandlordReview from './views/landlord/landlordReview.vue'
import HouseManageList from './views/house/houseManageList.vue'
import FirstExamine from './views/house/firstExamine.vue'
import ContractList from './views/contract/contractList.vue'
import LoanList from './views/loanOrder/loanList.vue'
import LoanExamineList from './views/loanOrder/loanExamineList.vue'
import OrderExamineList from './views/loanOrder/orderExamineList.vue'

let routes = [
{
    path: '/',
    redirect: '/login',
    hidden: true,
},
  {
    path: '/login',
    name: 'login',
    hidden: true,
    component: Login,
    meta: { title: '登陆'}

  },
  {
    path: '/',
    component: Home,
    name: '主页',
    meta: { title: '首页'},
    iconCls: 'home',
    leaf: true, //只有一个节点
    children: [
      { path: '/index',
        component: Index, name: '首页',meta: { title: '首页'} }
    ]
  }, {
    path: '/commonPlatform',
    component: Home,
    name: '通用平台',
    iconCls: 'gear-b',
    children: [
      {path: '/userCenter', component: UserCenter, name: '账户中心',meta: { title: '账户中心'}},
      {path: '/infoCenter', component: InfoCenter, name: '消息中心',meta: { title: '消息中心'}}
    ]
  },
  {
    path: '/landlord',
    component: Home,
    name: '房东信息管理',
    iconCls: 'person-stalker',
    children: [
      {path: '/landlordManage', component: LandlordManage, name: '房东综合管理'},
      {path: '/landlordReview', component: LandlordReview, name: '房东资质审核'}
    ]
  },
  {
    path: '/house',
    component: Home,
    name: '房源信息管理',
    iconCls: 'ios-folder',
    children: [
      {path: '/houseManageList', component: HouseManageList, name: '房源综合管理列'},
      {path: '/firstExamine', component: FirstExamine, name: '初步审核'}
    ]
  },
  {
    path: '/contract',
    component: Home,
    name: '合同管理',
    iconCls: 'document-text',
    children: [
      {path: '/contractList', component: ContractList, name: '合同列表'}
    ]
  },
  {
    path: '/loanOrder',
    component: Home,
    name: '放款管理',
    iconCls: 'person-stalker',
    children: [
      {path: '/loanList', component: LoanList, name: '放款订单综合管理'},
      {path: '/loanExamineList', component: LoanExamineList, name: '放款审核'},
      {path: '/orderExamineList', component: OrderExamineList, name: '订单放款'}
    ]
  },
]
export default routes;